package com.lfp.consumer;

import com.lfp.config.rabbitmq.TtlQueueConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @Description TTL延时队列消费者
 * @Author lfp
 * @Date 2022/7/17
 * @Version 1.0
 */
@Slf4j
@Component
public class TTLQueueConsumer {

    //监听死信队列 TtlQueueConfig.DEAD_LEFTTER_QUEUE_D
    @RabbitListener(queues = TtlQueueConfig.DEAD_LEFTTER_QUEUE_D)
    public void receiveConfirmMessage(String message){
        log.info("接收到延时队列消息：{}",message);
    }
}
